package com.An.service.impl;

import com.An.dao.LoginDao;
import com.An.pojo.AdminUser;
import com.An.pojo.Student;
import com.An.pojo.StudentUser;
import com.An.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @auther AnYang
 * @date 2022/3/25 15:34
 **/
@Service
public class LoginServiceImpl implements LoginService {
	@Autowired
	private LoginDao loginDao;

	@Override
	public StudentUser getUserBySno(Integer sno) {
		return loginDao.getUserBySno(sno);
	}

	@Override
	public StudentUser getUserByUserId(String userid) {
		return loginDao.getUserByUserId(userid);
	}

	@Override
	public boolean updateBySno(StudentUser user) {
		return loginDao.updateBySno(user);
	}

	@Override
	public AdminUser getAdminUserById(Integer id) {
		return loginDao.getAdminUserById(id);
	}

	@Override
	public AdminUser getAdminUserByUsername(String username) {
		return loginDao.getAdminUserByUsername(username);
	}

	@Override
	public Student getStudentBySno(Integer sno) {
		return loginDao.getStudentBySno(sno);
	}
}